{% extends "base.html" %}
{% block pagetitle %} Escrow Search {% endblock %}
{% block appbar %} Escrow Search {% endblock %}

{% block section %}
  Search for recovery keys / passphrases here. Matches are exact string comparisons.
{% endblock %}

{% block mainbody %}
  {% if bitlocker_fields %}
    <h2 class="appname">BitLocker</h2>
    <div class="escrow-type-block">
      <form method="GET">
        <input type="hidden"  name="search_type" value="bitlocker" />
        <select name="field1" class="kd-menubutton">
          {% for k, v in bitlocker_fields %}
          <option value="{{k}}">{{v}}</option>
          {% endfor %}
        </select>
        <input type="text" size="40" name="value1">
        <br /><br />
        <label for="prefix_bitlocker">Prefix Search:</label>
        <input type="checkbox" id="prefix_bitlocker" name="prefix_search" value="1" checked="checked"/>
        <br /><br />
        <input type="submit" value="Search" class="kd-button kd-button-submit"><br />
      </form>
      <br />
      <a href="/logs?log_type=bitlocker">BitLocker Access Logs</a>
    </div>
  {% endif %}

  {% if filevault_fields %}
    <h2 class="appname">FileVault</h2>
    <div class="escrow-type-block">
      <form method="GET">
        <input type="hidden"  name="search_type" value="filevault" />
        <select name="field1" class="kd-menubutton">
          {% for k, v in filevault_fields %}
          <option value="{{k}}">{{v}}</option>
          {% endfor %}
        </select>
        <input type="text" size="40" name="value1">
        <br /><br />
        <label for="prefix_filevault">Prefix Search:</label>
        <input type="checkbox" id="prefix_filevault" name="prefix_search" value="1"/>
        <span style="font-size: 80%">(not compatible with Escrow Username)</span>
        <br /><br />
        <input type="submit" value="Search" class="kd-button kd-button-submit"><br />
      </form>
      <br />
      <a href="/logs?log_type=filevault">FileVault Access Logs</a>
    </div>
  {% endif %}

  {% if luks_fields %}
    <h2 class="appname">Luks</h2>
    <div class="escrow-type-block">
      <form method="GET">
        <input type="hidden"  name="search_type" value="luks" />
        <select name="field1" class="kd-menubutton">
          {% for k, v in luks_fields %}
          <option value="{{k}}">{{v}}</option>
          {% endfor %}
        </select>
        <input type="text" size="40" name="value1">
        <br /><br />
        <label for="prefix_luks">Prefix Search:</label>
        <input type="checkbox" id="prefix_luks" name="prefix_search" value="1"/>
        <span style="font-size: 80%">(not compatible with Escrow Username)</span>
        <br /><br />
        <input type="submit" value="Search" class="kd-button kd-button-submit"><br />
      </form>
      <br />
      <a href="/logs?log_type=luks">Luks Access Logs</a>
    </div>
  {% endif %}

  {% if provisioning_fields %}
    <h2 class="appname">Provisioning</h2>
    <div class="escrow-type-block">
      <form method="GET">
        <input type="hidden" name="search_type" value="provisioning" />
        <select name="field1" class="kd-menubutton">
          {% for k, v in provisioning_fields %}
          <option value="{{k}}">{{v}}</option>
          {% endfor %}
        </select>
        <input type="text" size="40" name="value1">
        <br /><br />
        <label for="prefix_provisioing">Prefix Search:</label>
        <input type="checkbox" id="prefix_provisioning" name="prefix_search" value="1" />
        <span style="font-size: 80%">(not compatible with Escrow Username)</span>
        <br /><br/>
        <input type="submit" value="Search" class="kd-button kd-button-submit">
      </form>
      <br />
      <a href="/logs?log_type=provisioning">Provisioning Access Logs</a>
    </div>
  {% endif %}
  </div>
{% endblock %}
